<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddTebateRuleToGoodSpecs extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('good_specs', function (Blueprint $table) {
            //
            $table->integer('level1_rebate')->default(0);
            $table->integer('level2_rebate')->default(0);
            $table->integer('level3_rebate')->default(0);
            $table->integer('level_2_3_rebate')->default(0);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('good_specs', function (Blueprint $table) {
            //
            $table->dropColumn(['level1_rebate', 'level2_rebate', 'level3_rebate', 'level_2_3_rebate']);
        });
    }
}
